<#import "../tpl/pageTep.ftl" as page>
<@page.pageBase currentMenu="补卡列表">
<style>
    .button-large {
        font-size: 16px;
    }

    hr {
        border-color: #009688;
    }
</style>
<div class="xm-offline">
    <div class="row">
        <div class="panel">
            <div class="panel-header">
                <a href="${basepath}/manage/retroactive/toOrganizeResignApproveList">返回上一级</a>
            </div>
            <div class="panel-body">
                <form id="approvalForm" class="form-horizontal" action="#">
                    <input type="hidden" class="control-text span-width span10" name="id" value="${e.id!}">
                    <div class="control-group">
                        <label class="control-label">
                            <s>*</s>
                            补卡人：
                        </label>
                        <div class="controls">
                            <input disabled type="text"   class="control-text span-width span5" name="title" value="${e.applicantName!}">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            <s>*</s>
                            补卡类型：
                        </label>
                        <div class="controls">
                            <input disabled type="text"   class="signType control-text span-width span5" name="title" value="${e.signType!}">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">
                            <s>*</s>
                            补卡活动：
                        </label>
                        <div class="controls">
                            <input disabled type="text"   class="control-text span-width span5" name="title" value="${e.offlineName!}">
                        </div>
                    </div>
                    <div class="control-group" style="height: 200px;">
                        <label class="control-label">
                            <s>*</s>
                            补卡事由：
                        </label>
                        <div class="controls">
                            <textarea disabled type="text"  style="height: 160px;resize: none;"  class="control-text span-width span8" name="title" >${e.description!}</textarea>
                        </div>
                    </div>
                    <hr>
                    <div class="centered">
                        <a id="btnShow" class="button  button-large  button-success">审核</a>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
<#-------------------------------------------------------审核弹窗 start-------------------------------------------------------->
<div id="editContent" style="display:none;">
    <form id="editForm" class="form-horizontal" action="${basepath}/manage/retroactive/updateJson" method="post">
        <input type="hidden" class="input-normal control-text" name="id" value="${e.id!}"/>
        <div class="row">
            <div class="control-group span16">
                <label class="control-label">审核状态：</label>
                <div class="controls control-row4">
                    <select  name="status" value="${e.status!}" id="status">
                        <option value="">-请选择-</option>
                        <option value="pass">通过</option>
                        <option value="fail">不通过</option>
                    </select>
                </div>
            </div>
        </div>
    </form>
<#-------------------------------------------------------审核弹窗 end-------------------------------------------------------->
</div>

<script type="text/javascript">

    <#--活动类型-->
   var signType=$('.signType').val();
    if(signType=='in'){
        $('.signType').val('签到补卡');
    }else{
        $('.signType').val('签退补卡');
    }
    var editForm = new BUI.Form.Form({
        srcNode: '#editForm',
        submitType: 'ajax',
        callback: function (data) {
            window.location.href = "${basepath}/manage/retroactive/toOrganizeResignApproveList"
        }
    });
    editForm.render();
    var editDialog = new BUI.Overlay.Dialog({
        title: '编辑审核状态',
        width: 500,
        height: 120,
        contentId: 'editContent',
        success: function () {
            editForm.ajaxSubmit();
        }
    });
    //编辑按钮事件
    $('#btnShow').on('click', function () {
        editDialog.show();
    });
</script>

</@page.pageBase>